﻿using OpenLS.Core.Serialization;
using OpenLS.Drawing.Serialization;

namespace OpenLS.Spreadsheet.Formats.Biff.OfficeArt
{
    class DownRevStg: IOfficeXmlSerializable
    {
        //
        public void ReadXml(ReadContext context)
        {
        }

        internal const string data =
            @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>
<a:downRevStg xmlns:a=""http://schemas.openxmlformats.org/drawingml/2006/main"" shapeCheckSum=""YkP1EZZfMrSEFtE7YiKbTi==&#xA;"" textCheckSum="""" 
shapeId=""100000"" ver=""2"">
	<a:xlAnchor fResize=""1"">
		<a:from row=""1"" col=""0""   rowOffset=""0"" colOffset=""0"" />
		<a:to row=""8"" col=""3"" rowOffset=""95250"" colOffset=""76200"" />
	</a:xlAnchor>
</a:downRevStg>";
        public void WriteXml(WriteContext context)
        {
            using (var downRevStg = context.WriteAndSwitch("downRevStg", DrawingConstants.DrawingNamespace))
            {
                downRevStg.SetString("shapeCheckSum", "YkP1EZZfMrSEFtE7YiKbTi==&#xA;");
                downRevStg.SetString("textCheckSum", "");
                downRevStg.SetString("shapeId", "100000");
                downRevStg.SetString("ver", "2");
                using (var xlAnchor = downRevStg.Write("xlAnchor"))
                {
                    xlAnchor.SetString("fResize", "1");
                    using (var from = xlAnchor.Write("from"))
                    {
                        from.SetString("row", "1");
                        from.SetString("col", "0");
                        from.SetString("rowOffset", "0");
                        from.SetString("colOffset", "0");
                    }
                    using (var to = xlAnchor.Write("from"))
                    {
                        to.SetString("row", "8");
                        to.SetString("col", "3");
                        to.SetString("rowOffset", "95250");
                        to.SetString("colOffset", "76200");
                    }
                }
            }
        }
    }
}